package com.ww.basic.implicits

/**
 * 隐式值转换
 */
object Test3 {
  def main(args: Array[String]): Unit = {
    // 隐式值：将String类型的“default”自动转为Int 100
    implicit val defaultInt: String => Int = _ => 100
    val x: Int = "default"
    println(x) // 100
  }
}
